<?php
namespace  plugin\banmitongcheng\api;

use app\admin\controller\banmi_tongcheng\model\PluginBanmiTongchengShopList;
use app\admin\controller\banmi_tongcheng\validate\ShoplistValidate;
use app\banmi\common\Basehome;

use think\facade\Db;

class Shoplist extends Basehome
{
    public $NotLogin=["paginate_hqzxrz"];
    /**
    * @notes  获取最新入驻
    * @variable  status=;
    * @date 2023-04-15 19:26:22
    * @author 半米科技低代码一键生成
    */
    public function paginate_hqzxrz()
    {
        $request= (new ShoplistValidate())->IsCheck();
        $field="id,shop_name,shop_img,shop_tel";
        $map=[
                  ['status',	'=' ,	'2'],
                  ];
        $model =(new PluginBanmiTongchengShopList())->paginate($map, $field);
             
        $time=time();
        Db::name('plugin_banmi_tongcheng_shop_list')->where('top_end_time', '<', time())->update(['top_end_time' => 0 ]);
             
        $data['list']=$model;
        ajaxmsg('ok', 200, $data);
    }
    //控制器方法
}
